package com.xxr.mom.ci.common.exception;

import com.xxr.mom.ci.common.enums.InterworkingRetEnum;
import lombok.Data;

/**
 * @description: InterworkingException
 * @date: 2024/8/3 23:56
 * @author: natsuki_kining
 * @version: 1.0
 */
@Data
public class InterworkingException extends RuntimeException{

    private Integer code;

    private String message;

    public InterworkingException(InterworkingRetEnum interworkingRetEnum) {
        this.code = interworkingRetEnum.getRet();
        this.message = interworkingRetEnum.getDesc();
    }

    public InterworkingException(InterworkingRetEnum interworkingRetEnum, String message) {
        this.code = interworkingRetEnum.getRet();
        this.message = message;
    }

}
